#include <asm.h>
#include <regdef.h>
#include <new_inst_test.h>

LEAF(my13_tlt_ex_test)
    .set noreorder
    addiu s0,s0,1
    li    t0,0x800d0000
    li    s2,9
    sw    s2,0(t0)
##clear cause.TI, status,EXL
    mtc0  zero,c0_compare;
    lui   s7,0x0040
    mtc0  s7,c0_status
    nop
    lui   s7,0x0009
# point 1 ---------------
    li s2,0;
    li t0,1;
    li t1,2;
    la s4,tlt_pc_0;
tlt_pc_0:
    tlt t0,t1;
    nop

# point 2 ------don't happen-----
    li s2,0;
    li t0,2;
    li t1,2;
    la s4,tlt_pc_1;
tlt_pc_1:
    tlt t0,t1;
    nop
# point 3 ------don't happen---------
    li s2,0;
    li t0,0;
    li t1,0xfffffff;
    la s4,tlt_pc_2;
tlt_pc_2:
    tlt t0,t1;
    nop
# point 3 --------------
    li s2,0;
    li t0,0x2;
    li t1,0x5;
    la s4,tlt_pc_3;
tlt_pc_3:
    tlt t0,t1;
    nop



###score ++
    addiu s3, s3, 1
###output (s0<<24)|s3
test:
    beq s0,s3,inst_error
    nop
    addiu s3,s3,1
    j test
    nop
inst_error:
    sll t1, s0, 24
    or t0, t1, s3
    sw t0, 0(s1)
    jr ra
    nop
END(my13_tlt_ex_test)
